import axios from './axios'
import qs from 'qs'
import {appUrl} from '@/config/config'
// 获取团队架构 /agent-center/team/getTeamStructureByMove
export const getTeamList = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: appUrl + '/agent-center/team/getTeamStructureByMove',
            method: 'get',
            params: data
        }).then(res => {
            resolve(res.data)
        })
    })
}

export const createTeam = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: appUrl + '/agent-center/team/create',
            method: 'post',
           
        }).then(res => {
            resolve(res.data)
        })
    })
}

export const pageMyTeams = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: appUrl + '/agent-center/team/pageMyTeams',
            method: 'post',
            data: qs.stringify(data)
        }).then(res => {
            resolve(res.data)
        })
    })
}